<?php if ( isset($this->step) && $this->step === 0) {?>
<table>
	<thead>
		<tr>
			<th>Pattern</th>
			<th>Variables</th>
		</tr>
	</thead>
	<tbody>
		<?php foreach ($this->patternList as $p) {?>
		<tr>
			<td>
			<?php echo $p['label'];?>
			</td>
			<td>
			<?php foreach ($p['vars'] as $var) echo $var['name'] . ', '; ?>
			</td>
			<!--
			<?php foreach ($p['vars'] as $var) {?>
				<td>
				<span style="font-style: italic;"><?php echo $var['name'];?></span> <?php echo $var['desc'];?>
				<ul>
				<?php foreach ($var['val'] as $val) {?>
					<li><?php echo $val;?></li>
				<?php } ?>
				</ul>
				</td>
			<?php } ?>
			-->
			<td>
				<a href="<?php echo $p['launcher_select'];?>">select</a>
			</td>
		</tr>
		<?php } ?>
	</tbody>
</table>
<?php } else if (isset($this->step) && $this->step === 1) {?>
	<h3><?php echo $this->pattern->getLabel(); ?></h3>
	<p><?php echo $this->pattern->getDescription(); ?></p>
	<table>
		<thead>
			<tr>
				<th>Binding</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
		<?php foreach ($this->binding as $bid => $bind) { ?>
			<tr>
			<td>
			<?php foreach ($bind as $var) { ?>
			<p>
                NAME: <?php echo $var['name']; ?><br/>
                TYPE: <?php echo $var['type']; ?><br/> 
				DESCRIPTION: <?php echo $var['desc']; ?><br/> 
			    VALUE: <span style="font-style: italic;"><?php if (array_key_exists('val',$var)) {
			        echo $var['val'];
		        } else {
		            echo 'unbelegt';
		        }?>
		        </span>
		    </p>
			<?php } ?>
			</td>
			<td>
				<a href="<?php echo $this->execLinks[$bid];?>"><?php echo $this->_('select'); ?></a>
			</td>
			</tr>
		<?php } ?>
		</tbody>
	</table>
<?php } ?>